package com.example.houseready

import android.annotation.SuppressLint
import android.content.Intent
import android.graphics.Color
import android.os.Bundle
import android.provider.CalendarContract.Colors
import android.widget.Button
import android.widget.TextView
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Button
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.example.houseready.ui.theme.HousereadyTheme

class MainActivity : ComponentActivity() {
    @SuppressLint("ResourceAsColor", "MissingInflatedId")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContentView(R.layout.activity_main_home)
        var textView =  findViewById<TextView>(R.id.home_title)
        textView.setBackgroundColor(R.color.purple_200)

       var btn =   findViewById<Button>(R.id.other_home)
       btn.setOnClickListener {
       var intent_push = Intent()
       intent_push.setClass(this,MainActivity_home_Intent::class.java)
       startActivity(intent_push)
   }

      var btn_relative = findViewById<Button>(R.id.other_relative)
        btn_relative.setOnClickListener {
            var  intents = Intent(this,relative_layout_home::class.java)
            startActivity(intents)
        }



    }
}

@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
    Text(
        text = "Hello $name!",
        modifier = modifier
    )
}

@Preview(showBackground = true)
@Composable
fun GreetingPreview() {
    HousereadyTheme {
        Greeting("Android")
    }
}